function shuffle(array){
    let arr = array.slice(0);
    for(let i = arr.length - 1; i > 0 ;i--){
        const randomIndex = Math.floor(Math.random() * i + 1);
        [arr[i],arr[randomIndex]] = [arr[randomIndex],arr[i]];
    }
    return arr
}

module.exports = shuffle;